﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class QuocGiaModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public string Images { get; set; }
        public Nullable<bool> Status { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        public Nullable<bool> Detele { get; set; }
        public string Keywork { get; set; }
        public string metaDescription { get; set; }
        public string MetaTitle { get; set; }
        public Nullable<int> ChauLucID { get; set; }
        public string alpha2 { get; set; }
        public string alpha3 { get; set; }
        public string countrycode { get; set; }
        public string iso31662 { get; set; }
        public string regioncode { get; set; }
        public string subregioncode { get; set; }

        public ChauLucModel chaulucMode { get; set; }

        public static void MapFrom(QuocGiaModel mode, ref QuocGia entity)
        {
            entity.Id = mode.Id;
            entity.Name = mode.Name;
            entity.Status = mode.Status;
            entity.DateCreate = mode.DateCreate;
            entity.Detele = mode.Detele;
            entity.Description = mode.Description;
            entity.Keywork = mode.Keywork;
            entity.metaDescription = mode.metaDescription;
            entity.MetaTitle = mode.MetaTitle;

            entity.Images = mode.Images;
            entity.ChauLucID = mode.ChauLucID;
            entity.alpha2 = mode.alpha2;
            entity.alpha3 = mode.alpha3;
            entity.countrycode = mode.countrycode;
            entity.iso31662 = mode.iso31662;
            entity.regioncode = mode.regioncode;
            entity.subregioncode = mode.subregioncode;
        }

        public static void MapFrom(QuocGia entity, ref QuocGiaModel mode)
        {
            mode.Id = entity.Id;
            mode.Name = entity.Name;
            mode.Status = entity.Status;
            mode.DateCreate = entity.DateCreate;
            mode.Detele = entity.Detele;
            mode.Description = entity.Description;
            mode.Keywork = entity.Keywork;
            mode.metaDescription = entity.metaDescription;
            mode.MetaTitle = entity.MetaTitle;
            mode.regioncode = entity.regioncode;

            mode.Images = entity.Images;
            mode.ChauLucID = entity.ChauLucID;
            mode.alpha2 = entity.alpha2;
            mode.alpha3 = entity.alpha3;
            mode.countrycode = entity.countrycode;
            mode.iso31662 = entity.iso31662;
            mode.regioncode = entity.regioncode;
            mode.subregioncode = entity.subregioncode;
        }
    }
}